package com.tjetc.portal;

import com.tjetc.usermanage.*;

import java.util.Scanner;

public class UserMainView {
    private static Scanner scanner = new Scanner(System.in);
    public void start() {
        while (true) {
            System.out.println("用户功能菜单");
            System.out.println("1.居民信息");
            System.out.println("2.社区活动");
            System.out.println("3.物业服务");
            System.out.println("4.维修请求服务");
            System.out.println("5.社区公告");
            System.out.println("6.社区投诉");
            System.out.println("7.社区费用");
            System.out.println("0.返回上一级");
            int i = scanner.nextInt();
            switch (i){
                case 1:
                    new ResidenteView().start();//居民信息
                    break;
                case 2:
                    new EventView().start();//社区活动
                    break;
                case 3:
                    new ServiceView().start();//物业服务
                    break;
                case 4:
                    new MaintenanceView().start();//维修请求
                    break;
                case 5:
                    new NoticeView().start();//社区公告
                    break;
                case 6:
                    new ComplaintView().start();//社区投诉
                    break;
                case 7:
                    new FeeView().start();//社区费用
                    break;
                case 0:
                    return;
                default:
                    System.out.println("输入有误，请重新输入");
                    break;
            }
        }
    }
}
